<template>
  <view class="TaskMessageItem animate__animated animate__bounceInRight">
    <view class="left">
      <view class="content">{{ messageDetail.content }}</view>
      <view class="time">{{
        $formatTime.formatTimeToHHMMSS(messageDetail.createTime)
      }}</view>
    </view>
    <view class="operator">
      <view class="read">{{ messageDetail.isView ? "已读" : "未读" }}</view>
    </view>
  </view>
</template>

<script>
export default {
  name: "TaskMessageItem",
  props: {
    messageDetail: {
      type: Object,
      required: true,
    },
  },
};
</script>

<style lang="scss" scoped>
.TaskMessageItem {
  display: flex;
  justify-content: space-between;
  box-sizing: border-box;
  padding: 20rpx;
  margin-bottom: 20rpx;
  height: 180rpx;
  font-size: 28rpx;
  color: #999;
  border-bottom: 1px solid #eee;
  .left {
    width: 60%;
    .content {
      width: 100%;
      text-overflow: ellipsis;
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }
  }
  .left,
  .operator {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .operator {
    align-items: flex-end;
  }
}
</style>
